package com.demo.shardingsphere.order.service.impl;


import com.demo.shardingsphere.order.mapper.OrderMapper;
import com.demo.shardingsphere.order.model.Order;
import com.demo.shardingsphere.order.service.IOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Slf4j
@Service
public class OrderServiceImpl implements IOrderService {

    @Autowired
    private OrderMapper orderMapper;


    @Override
    public int insertOrder(Order order) {
        return orderMapper.insertOrder(order);
    }



    @Override
    public Order queryOrder(String orderNo) {
        return orderMapper.queryByOrderNo(orderNo);
    }

    @Override
    public List<Order> queryOrderListByUserId(Long userId) {
        return orderMapper.queryOrderListByUserId(userId);
    }


}
